package zhongjinsuo;

import java.util.Scanner;

/**
 * @author tmh
 * @date 2024/11/5 19:32
 * @description
 */
public class T找鞍点 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int result =0;
        int n;
        n = scanner.nextInt();
        int[][] array = new int[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                array[i][j] = scanner.nextInt();
            }
        }
        int minColumn=0;
        int minRow =0;
        for (int i = 0; i < n; i++) {
            boolean flag = false;
            int rowMax = array[i][0];
            for (int j = 0; j < n; j++) {
                if (array[i][j]>rowMax){
                    rowMax=array[i][j];
                    minRow=i;
                    minColumn=j;
                }
            }
            for (int k=0;k<n;k++){
                if (array[k][minColumn]<rowMax){
                    flag=true;
                    break;
                }
            }
            if (!flag){
                result++;
                System.out.println(minRow+" "+minColumn);
            }
        }
        if (result==0){
            System.out.println("None");
        }
    }
}
